#include <memory>
#include "TcpServer.hpp"

void Usage(std::string proc)
{
    std::cerr << "Usage : " << proc << " serverport" << std::endl;
}

// ./tcp_server serverport
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }
    EnableConsoleLogStrategy();
    std::unique_ptr<TcpEchoServer> ptr = std::make_unique<TcpEchoServer>();
    ptr->Init();
    ptr->Start();
    return 0;
}